package cn.edu.cdtu.yulei.test_demo.controller;

import cn.edu.cdtu.yulei.test_demo.service.impl.InterfaceInfoImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/userAgent.do")
public class GetUserAgentController extends HttpServlet {
    /**
     * 获取用户浏览器信息
     * @param req
     * @param resp
     */
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp){
        String userAgent = req.getHeader("User-Agent");
        System.out.println(userAgent);
        InterfaceInfoImpl interfaceInfo = new InterfaceInfoImpl();
        interfaceInfo.addInterfaceInfo("/commService/userAgent.do");
    }
}
